﻿using EasyCore.Domain.Entities;
using EasyCore.Entities;
using EasyCore.Entities.Auditing;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EasyAdmin.Domain.Entities.Applications
{
    [SugarTable("tst_books")]
    [Tenant("aa")]
    public class Book : Entity, IFullAudited
    {
        public long Id { get; set;}
        public string Name { get; set; }
        public string Auther { get; set; }
        public DateTime PublishDate { get; set; }
        public float Price { get; set; }
        [SugarColumn(ColumnDescription = "创建人", IsNullable = true)]
        public long? CreatorBy { get; set; }
        [SugarColumn(ColumnDescription = "创建时间", IsNullable = true)]
        public DateTime? CreationTime { get; set; }
        [SugarColumn(ColumnDescription = "最后修改者", IsNullable = true)]
        public long? LastModificationBy { get; set; }
        [SugarColumn(ColumnDescription = "最后修改时间", IsNullable = true)]
        public DateTime? LastModificationTime { get; set; }
        [SugarColumn(ColumnDescription = "删除人", IsNullable = true)]
        public long? DeletionBy { get; set; }
        [SugarColumn(ColumnDescription = "删除时间", IsNullable = true)]
        public DateTime? DeletionTime { get; set; }
        [SugarColumn(ColumnDescription = "是否删除", IsNullable = true)]
        public bool IsDeleted { get; set; }

        public Book()
        {
            PublishDate = DateTime.Now;
        }

    }
}
